package com.qing.spark.dao

import scala.collection.mutable.ListBuffer

/**
  * Created by wuliao on 2018/3/16.
  */
case class IPDayCount(ip: String, day: Int, packageSize: Int, dataSize: Int)

object IPDayCountDao {
  val tableName = "ip_day_count"

  val family = "data"

  val qualifier1 = "packageSize"

  val qualifier2 = "dataSize"

  def save(lists: ListBuffer[IPDayCount]): Unit = {

//    val table = HBaseUtils.getInstance.getTable(tableName)
//    for (temp <- lists) {
//      table.incrementColumnValue((temp.ip + "-" + temp.day).getBytes,
//        family.getBytes, qualifier1.getBytes, temp.packageSize)
//
//      table.incrementColumnValue((temp.ip + "-" + temp.day).getBytes,
//        family.getBytes, qualifier2.getBytes, temp.dataSize)
//    }

  }
}
